<?php
use Swoft\Bean\BeanFactory;

if (! function_exists('session')) {
    /**
     * Get Session
     *
     * @return \Session\SessionInterface
     */
    function session()
    {
        /** @var \Session\SessionManager $sessionManager */
        $sessionManager = BeanFactory::getBean('sessionManager');
        return $sessionManager->getSession();
    }
}
